const connection = require('../app/database')
class RightService {
  async getRightList(roleId) {
    const statement = `
      SELECT right_id id,right_name name,path FROM rights 
      WHERE role_id = ?;
    `
    const [res] = await connection.execute(statement,[roleId])
    return res
  }
}

module.exports = new RightService()